<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String skin = request.getParameter("skin");
	skin = skin == null ? "" : skin;
	String logout=request.getParameter("logout");
	if(logout!=null){
		session.invalidate();
		response.sendRedirect("login.jsp");
	}		
%>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<title>春之翼</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="assets/css/dpl-min.css" rel="stylesheet" type="text/css" />

<style type="text/css">
/*行变色表格*/
table.zebra,.zebra th,.zebra td {
	border-width: 1px;
	border-style: solid;
	margin: 0;
	font-family: 'Microsoft Yahei', Tahoma, Arial !important;
	font-family: '宋体', Tahoma, Arial;
}

table.zebra {
	table-layout: fixed;
	width: 100%;
	margin-bottom: 6px;
	padding: 0 1px 1px 0;
	border-spacing: 0;
	border-collapse: separate;
	*border-collapse: collapse;
	border-color: #abb8ce;
	background: #EDEDED;
}

.zebra th {
	padding: 5px 4px;
	font-weight: bold;
	border-color: #f8f8f8 #abb8ce #abb8ce #f8f8f8;
	text-align: left;
	text-shadow: 1px 1px 0 #e4edfb;
	vertical-align: middle;
	background: #d0dbee;
}

.zebra thead th {
	text-align: center;
}

.zebra th strong {
	color: #090;
	border-bottom: 1px dashed #090;
	text-decoration: underline;
}

.zebra td {
	padding: 0;
}

.zebra th.separate {
	text-align: center;
	border-color: #E1F196 #AECD1B #AECD1B #F3FAD6;
	background-color: #f3f7fd;
}

.zebra td {
	padding: 4px;
	font: 12px/18px Consolas, "Courier New", Courier, monospace;
	text-align: left;
	vertical-align: top;
}

.zebra td {
	border-color: #f8f8f8 #abb8ce #abb8ce #f8f8f8;
	background: #e0e8f5;
}

.zebra tr.odd th {
	background: #dbe4f4;
}

.zebra tr.odd td {
	background: #e6eef9;
}

.zebra br {
	margin-bottom: 1.8em;
}
</style>
</head>
<body>
	<div class="header">
		<div class="dl-title"></div>
		<div class="dl-log">
			欢迎您，<span class="dl-log-user"><sec:authentication property="name" />
			</span> <a href="<%=path%>/main.jsp?logout" title="退出系统" class="dl-log-quit">[退出]</a>
			<a href="javascript:void(0)" onclick="chkPwd()" title="修改密码"
				class="dl-log-quit">修改密码</a> <a href="javascript:void(0)"
				id="demo_skin" class="dl-log-quit">切换主题</a>
		</div>
	</div>
	<div class="content">
		<div class="dl-main-nav">
			<ul id="J_Nav" class="nav-list ks-clear">
				<li class="nav-item dl-selected"><div
						class="nav-item-inner nav-storage">首页</div>
				</li>
				<li class="nav-item"><div class="nav-item-inner nav-inventory">搜索页</div>
				</li>
			</ul>
		</div>
		<ul id="J_NavContent" class="dl-tab-conten">
		</ul>
	</div>


	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/jquery.cookie.js"></script>
	<script>
	// skin demo
	(function() {
		var _skin;
		_skin=$.cookie("daSkin");
		var _skin2="";
		if(_skin=='iblack'||_skin=='hei'||_skin=='mac'){
			_skin2="black-";
		}else if(_skin=='igreen'){
			_skin2="igreen-";
		}else{		
			_skin2="";
		}
		var myCss="<link href='assets/css/"+_skin2+"bui-min.css' rel='stylesheet' type='text/css' />"
				+"<link href='assets/css/"+_skin2+"main-min.css' rel='stylesheet' type='text/css' />";
		document.write(myCss+'<scr'+'ipt src="<%=path%>/js/lhgdialog/lhgdialog.min.js?skin=' + (_skin || 'iblue') +'"></sc'+'ript>');
	})();
	</script>
	
	<script type="text/javascript" src="assets/js/bui-min.js"></script>
	<script type="text/javascript" src="assets/js/common/main-min.js"></script>
	<script type="text/javascript" src="assets/js/config-min.js"></script>
	<script type="text/javascript" src="js/chkSkin.js"></script>
	<script>
	$.ajax({
		url:'<%=path %>/userInfo/createMenu.do',
		type: "POST",
	    dataType: "json",
		success:function(data){
			BUI.use('common/main',function(){
				  var config="["+data.menus+"]";
			      config=eval(config);
			      var tabs=data.tabs;
			      var _navHtml="";
			      for(var i in tabs){
			      	var cls="nav-sample";
			      	var tname=tabs[i];
			      	if(tname.indexOf("短信")>-1){
			      		cls="nav-product-certified";
			      	}else if(tname.indexOf("邮件")>-1){
			      		cls="nav-supplier";
			      	}
			      	
			      	_navHtml+="<li class='nav-item'><div class='nav-item-inner "+cls+"'>"+tname+"</div></li>"
			      }
			      $("#J_Nav").html(_navHtml);
			      new PageUtil.MainPage({
			        modulesConfig : config
			      });
			});
		}
	});
 
	function chkPwd(){
		sopen("<%=path%>/authManage/changePwd.jsp","修改密码",400,300)
	}
	function openTab(title,url){
		top.topManager.openPage({
	       id : url,
	       href : url,
	       title :title
	    });
	}
	
  </script>
</body>
</html>